package STUDENT.DAODUCGIANG.BASIC.MY_FIRST_JAVA_PROGRAM;

import java.util.Scanner;

public class P2_4 {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	System.out.println("Moi ban nhap thang");
	int Thang = sc.nextInt();
	if (Thang == 4 ||  Thang == 6 || Thang == 9 ||  Thang == 11){
		System.out.println("So ngay trong thang la 30");}
	else if (Thang ==2){
		System.out.println("Moi ban nhap nam");
		int Nam = sc.nextInt();
		{if (Nam % 400 ==0 || (Nam % 4 == 0 && Nam % 100 !=0))
			System.out.println("So ngay trong thang la 29 ngay");
		else
			System.out.println("So ngay trong thang la 28");}
	}
	else 
		System.out.println("So ngay trong thang la 31");
	}
}
